<template>
  <div class="square" @click="handleClick">
    {{ val }}
  </div>
</template>

<script>
export default {
  name: "SquareComponent",
  props: {
    index: Number,
    val: String
  },
  methods: {
    handleClick() {
      this.$emit("click-square", this.index)
    }
  }
}
</script>

<style scoped>
.square {
  height: 70px;
  width: 70px;
  background-color: #fff;
  border: 1px solid #2c3e50;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
</style>
